package com.example.competitionregistration.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author QuanJingFang
 * @Description //TODO 错误码枚举类
 * @Date 2023/7/15 19:48
 **/

@NoArgsConstructor
@AllArgsConstructor
public enum ErrorCode {
    ACCOUNT_OR_PASSWORD_NO_EXIST_ERROR(1001,"账号或密码不存在"),

    SYSTEM_ERROR(1002,"系统错误"),

    NO_LOGIN_ERROR(1003,"未登录"),

    ACCOUNT_EXIST_ERROR(1004,"用户名已存在"),

    VERIFICATION_ERROR(1005,"校验不合法"),

    JWT_ERROR(1006,"JWT解析错误"),

    JOB_NUMBER_ERROR(1007,"该工号尚未被赋予"),

    FILE_NOT_FOUND_ERROR(2001,"请求的文件未找到"),

    FILE_IO_EXCEPTION_ERROR(2002,"请求的文件无法访问"),

    FILE_UPLOAD_FAILURE_ERROR(2003,"上传文件时出现问题");

    private int code;//错误码

    private String msg;//错误信息

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
